<template>
  <view class="clock-wrapper">
    <view style="flex: 1">
      <system-tab v-if="current_tab === 'system'" />
      <person-tab v-else />
    </view>
  </view>
</template>
<script>
import systemTab from './systemTab'
import personTab from './personTab'
export default {
  components: {
    systemTab,
    personTab
  },
  data(){
    return{
      current_tab: 'person'
    }
  },
  created() {
    this.setCurrentTab('person')
  },
  methods: {
    setCurrentTab(tab){
      this.current_tab = tab
      if(tab === 'system'){
        uni.setNavigationBarTitle({
          title: '系统通知'
        })
      }else{
        uni.setNavigationBarTitle({
          title: '消息通知'
        })
      }
    }
  }
}
</script>
<style lang="scss" scopped>
page{
  background: #FAFBFB;
}
.tab-wrapper-notice{
  .tab{
    .tab-text{
      padding-bottom: 4px;
      border-bottom: 1px solid #fff;
      &.active{
        color: $theme;
        border-bottom: 1px solid $theme;
      }
    }
  }
}
</style>
